<template>
	<view style="background-color: #FFFFFF;">
	<cu-custom bgColor="bg-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">照护服务</block> -->
		</cu-custom>
		<!-- 顶部卡 -->
		<view class="padding-sm " @click="content(item)">
			<view class="radius shadow shadow-lg bg-white det_top">
				<view class="detail">
					<view class="detail-img">
						<image src="../../../static/img/basics/u129.png" mode=""></image>
					</view>
					<view class="detail-right">
						<!-- top -->

						<view class="top">
							<view class="name">
								<text>{{item.oldBaseName}}</text>
								<text class="age">{{item.age}}岁</text>
							</view>
							<view>
								<view class='cu-tag round bg-orange'>{{item.abilityLevel}}</view>
							</view>
						</view>
						<!-- bot -->
						<view class="bot">
							<view class="left">
								<text>房间：</text>
								<text>{{item.roomName}}</text>
							</view>
							<view class="right">
								<text>床位：</text>
								<text>{{item.bedName}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 底部详情 -->
		<!-- tab -->
		<view class="tab">
			<view class="tab-item" @click="changcolor(index,item,'voice')" :class="{'text-orange':tabindex==index,'text-rig':index!=3}" v-for="(item,index) in tab"
			 :key="index">
				{{item}}
			</view>
		</view>
	<view style="height: 1vh;background-color: #FFFFFF;width: 100vw;">
		</view>
		<template v-if="tabindex==0">
			<view v-if="isHave">
				<view>
					<checkbox-group>
						<view class="block">
							<scroll-view scroll-y="true" class="scroll_right">
								<view class="scroll_right_inner">
							<view class="inner" v-for="(item,index) in jsList" :key="index">
								<view class="inner-center">
									<view class="block-item" @click="changeCheck(index,item)">
										<view class="position" style="width: 100%;height:100%;overflow: hidden;">
											<view class="position-inner">
												<label>
													<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
													 value="C"></checkbox>
												</label>
											</view>
											<view class="instant-item-inner" style="" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
												<image :src="item.serviceItemIcon.picUrl" mode=""></image>
												<!-- <view style="text-align: center;">{{item.serviceItemName}}</view>	 -->
											</view>
											<view class="position-diy" style="" v-if="item.serviceItemIcon.mode== 'diy'" :style="{color:item.serviceItemIcon.fontColor,background:item.serviceItemIcon.bacColor}">
												{{item.serviceItemIcon.word}}
											</view>
										</view>
									</view>
								</view>
								<view style="margin-top:12rpx;">
									{{item.serviceItemName}}
								</view>
							</view>
							</view>
							<view style="height: 13vh;width: 100%;">
							</view>
							</scroll-view>
						</view>
					</checkbox-group>
					<view class="submit">
						<button type="primary" v-if="isButton" @click="submit(0)">提交</button>
						<button type="default" v-else>提交</button>
					</view>
				</view>
			</view>
			<view v-else class="no-data">
				暂无数据
			</view>
		</template>
		<!-- 今日 -->
		<template v-if="tabindex===1">
			<view v-if="showrzTime">
			<view v-if="isHave">
				<view class="tplan">
					<view class="left">
						<scroll-view scroll-y="true" class="scroll_left">
						<view class="inner" :class="{rTime:rTime==index}" v-for="(item,index) in jrTime" :key="index" @click="changeTime(index,'rTime',item,'voice')">
							{{item.beginTime}}-{{item.endTime}}
							</view>
							</scroll-view>
					</view>
					<view class="right">
						<checkbox-group  v-if="isTime">
							<view class="block">
								<scroll-view scroll-y="true" class="scroll_right">
									<view class="scroll_right_inner">
								<view class="inner" v-for="(item,index) in jrList" :key="index">
									<view class="inner-center">
										<view style="overflow: hidden;" @click="changeTimeCheck(index,'rTime',item)" class="block-item" v-if="item.completeStatus==0">
											<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
												<view class="position-inner">
													<label>
														<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
														 value="C"></checkbox>
													</label>
												</view>
												<image :src="item.serviceItemIcon.picUrl" mode=""></image>
											</view>
											<view class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height:100%;"
											 :style="{background:item.serviceItemIcon.bacColor}">
												<view class="position-inner">
													<label>
														<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
														 value="C"></checkbox>
													</label>
												</view>
												<view style="position-center" :style="{color:item.serviceItemIcon.fontColor}">
													{{item.serviceItemIcon.word}}
												</view>
											</view>
										</view>
										<!-- 完成 -->
										<view class="block-item" v-if="item.completeStatus==1" @click="finish(item)">
											<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
												<view class="position-absoulte">
													已完成
												</view>
												<image :src="item.serviceItemIcon.picUrl" mode=""></image>
											</view>
											<!-- style="border-radius: 24rpx;" -->
											<view  class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height: 100%;border-radius: 24rpx;">
												<view class="position-absoulte">
													已完成
												</view>
												<view class="position-content" style=""  :style="{color:item.serviceItemIcon.fontColor,background:item.serviceItemIcon.bacColor}">
													{{item.serviceItemIcon.word}}
												</view>
											</view>
										</view>


									</view>
									<view>
										{{item.serviceItemName}}
									</view>
								</view>
								</view>
								</scroll-view>
							</view>
						</checkbox-group>
						<view v-else class="no-data" style="width: 100%;background-color: #FFFFFF; height:160rpx;">
							暂无数据
						</view>
					</view>
				</view>
				<view class="submit">
					<button type="primary" v-if="isButton" @click="submit(1)">提交</button>
					<button type="default" v-else>提交</button>
				</view>
			</view>
			<view v-else class="no-data">
				暂无数据
			</view>
			</view>
		</template>
		<!-- 本周 -->
		<template v-if="tabindex===2">
			<view class="tplan" v-show="showrzTime">
				<view class="left">
					<scroll-view scroll-y="true" class="scroll_left">
					<view class="inner" :class="{rTime:zTime==index}" v-for="(item,index) in bzTime" :key="index" @click="changeTime(index,'zTime',item,'voice')">
						{{item}}
					</view>
					</scroll-view>
				</view>
				<view class="right">
					<checkbox-group  v-if="isHave">
						<view class="block">
							<scroll-view scroll-y="true" class="scroll_right">
								<view class="scroll_right_inner">
							<view class="inner" v-for="(item,index) in bzList" :key="index">
								<view class="inner-center">
									<view style="overflow: hidden;" @click="changeTimeCheck(index,'zTime',item)" class="block-item" v-if="item.completeStatus==0">
										<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
											<view class="position-inner">
												<label>
													<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
													 value="C"></checkbox>
												</label>
											</view>
											<image :src="item.serviceItemIcon.picUrl" mode=""></image>
										</view>
										<view class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height:100%;"
										 :style="{background:item.serviceItemIcon.bacColor}">
											<view class="position-inner">
												<label>
													<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
													 value="C"></checkbox>
												</label>
											</view>
											<view style="position-center" :style="{color:item.serviceItemIcon.fontColor}">
												{{item.serviceItemIcon.word}}
											</view>
										</view>
									</view>
									<!-- 完成 -->
									<!-- 完成 -->
									<view class="block-item" v-if="item.completeStatus==1" @click="finish(item)">
										<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
											<view class="position-absoulte">
												已完成
											</view>
											<image :src="item.serviceItemIcon.picUrl" mode=""></image>
										</view>
										<view class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height: 100%;">
											<view class="position-absoulte">
												已完成
											</view>
											<view class="position-content" style=""  :style="{color:item.serviceItemIcon.fontColor,background:item.serviceItemIcon.bacColor}">
												{{item.serviceItemIcon.word}}
											</view>
										</view>
									</view>
									
								</view>
								<view>
									{{item.serviceItemName}}
								</view>
							</view>
							</view>
							</scroll-view>
						</view>
					</checkbox-group>
					<view v-else class="no-data" style="width: 100%;background-color: #FFFFFF; height:160rpx;">
						暂无数据
					</view>
				</view>
			</view>
			<view class="submit">
				<button type="primary" v-if="isButton" @click="submit(2)">提交</button>
				<button type="default" v-else>提交</button>
			</view>
		</template>
		<!-- 本月-->
		<template v-if="tabindex===3">
			<view class="tplan">
				<view class="left">
					<scroll-view scroll-y="true" class="scroll_left">
					<view style="font-size:26rpx;" class="inner" :class="{rTime:yTime==index}" v-for="(item,index) in byTime" :key="index" @click="changeTime(index,'yTime',item)">
						{{item.day}}
					</view>
					</scroll-view>
				</view>
				<view class="right">
					<checkbox-group v-if="isHave">
						<view class="block">
							<scroll-view scroll-y="true" class="scroll_right">
								<view class="scroll_right_inner">
							<view class="inner" v-for="(item,index) in byList" :key="index">
								<view class="inner-center">
									<view style="overflow: hidden;" @click="changeTimeCheck(index,'yTime',item)" class="block-item" v-if="item.completeStatus==0">
										<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
											<view class="position-inner">
												<label>
													<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
													 value="C"></checkbox>
												</label>
											</view>
											<image :src="item.serviceItemIcon.picUrl" mode=""></image>
										</view>
										<view class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height:100%;"
										 :style="{background:item.serviceItemIcon.bacColor}">
											<view class="position-inner">
												<label>
													<checkbox style="transform:scale(0.7)" class='round blue' :class="item.checked?'checked':''" :checked="item.checked?true:false"
													 value="C"></checkbox>
												</label>
											</view>
											<view style="position-center" :style="{color:item.serviceItemIcon.fontColor}">
												{{item.serviceItemIcon.word}}
											</view>
										</view>
									</view>
									<!-- 完成 -->
									<!-- 完成 -->
									<view class="block-item" v-if="item.completeStatus==1" @click="finish(item)">
										<view class="position" v-if="item.serviceItemIcon.mode=='local'||item.serviceItemIcon.mode=='sysIcon'">
											<view class="position-absoulte">
												已完成
											</view>
											<image :src="item.serviceItemIcon.picUrl" mode=""></image>
										</view>
										<view class="position" v-if="item.serviceItemIcon.mode== 'diy'" style="font-size: 40rpx;height: 100%;">
											<view class="position-absoulte">
												已完成
											</view>
											<view class="position-content" style=""  :style="{color:item.serviceItemIcon.fontColor,background:item.serviceItemIcon.bacColor}">
												{{item.serviceItemIcon.word}}
											</view>
										</view>
									</view>
								</view>
								<view>
									{{item.serviceItemName}}
								</view>
							</view>
							</view>
							</scroll-view>
						</view>
					</checkbox-group>
					<view v-else class="no-data" style="width: 100%;background-color: #FFFFFF; height:160rpx;">
						暂无数据
					</view>
				</view>
			</view>
			<view class="submit">
				<button type="primary" v-if="isButton" @click="submit(3)">提交</button>
				<button type="default" v-else>提交</button>
			</view>
		</template>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentTime:'', //时间变量，语音时候用
				jrId: '', //今日左侧时间id
				bztimeRange: '周一', //初时周时间
				bytimeRange: '第一周',//初始月时间
				rTime: 0,// 日左侧index
				zTime: undefined,//周左侧index
				yTime: 0,//月左侧index
				isButton: false,//提交是否正常
				tabindex: 0,//顶部的tab
				tab: ['即时服务','今日计划','本周计划','本月计划'], //tabList
				jsList: [], //及时服务数组 
				jrTime: [], //今日左侧时间数组
				bzTime: ['周一','周二','周三','周四','周五','周六','周日'], //本周左侧的时间的数组
				byTime: [], //本月左侧时间
				jrList: [], // 今日items
				bzList: [], // 本周items
				byList: [], // 本月items
				item: {}, //上页传递的对象
				oldBaseId: "", //老人id
				isHave: true,	 //是否有数据
				isTime:true,//及时服务是否有数据
				showrzTime:false,//先隱藏
			}
		},
		onShow() {
			// switch(this.tabindex){
			// 	case 0:
			// 		this.changcolor(0,'即时服务')
			// 	break
			// 	case 1:
			// 		this.changeTime(this.rTime,'rTime',this.jrTime[this.rTime])
			// 	break
			// 	case 2:
			// 		console.log(this.bzTime[this.rTime])
			// 		this.changeTime(this.zTime,'zTime',this.bzTime[this.zTime])
			// 	break
			// 	case 3:
			// 		this.changeTime(this.yTime,'yTime',this.byTime[this.yTime])
			// 	break
			// }
		},
		onLoad(options) {
			// uni.setStorageSync('tabindex')
			this.oldBaseId = options.oldBaseId
			this.getOldBaseInfo(this.oldBaseId)
			// this.immediatePlan()
			this.changcolor(0,'即时服务')
		},
		methods: {
			// GET /service/getCurWeekDay 获取当前是周几
			getCurWeekDay() {
				this.showrzTime = false
				this.$http('/care-service/service/getCurWeekDay', 'get').then(res => {
					if (res.data.code == 200) {
						// weekDay\
						 const weekDay = res.data.data
						for(let i = 0;i<this.bzTime.length;i++){
							if(weekDay==this.bzTime[i]){
								this.zTime = i;
								this.showrzTime = true
								console.log(this.zTime,'this.zTime')
							}
						}
						this.changeTime(this.zTime,'zTime',this.bzTime[this.zTime],'voice')
						 // "changeTime(index,'zTime',item,'voice')"
					}
				});
			},
			
			// 本月
			getBzTime(){
				this.$http('/care-service/service/getWeekNumDayWithMonth','get').then(res=>{
					if(res.data.code==200){
						this.byTime = res.data.data
						const byTime = res.data.data
						for(let i = 0 ;i<byTime.length;i++){
							if(byTime[i].isNow==true){
								this.yTime = i;
								this.changeTime(i, 'yTime',byTime[i].weekNum)
							}
						}
					}
				});
			},
			// /oldBaseDetail/getOldBaseInfo
			// 长者信息查询
			getOldBaseInfo(oldBaseId){
				let param = {
					id:oldBaseId
				}
				this.$http('/care-service/oldBaseDetail/getOldBaseInfo','get',param).then(res=>{
					if(res.data.code==200){
						this.item = res.data.data
					}
				});
			},
			// 完成的语音播放
			finish(item){
				if(this.$store.state.state&&this.$store.state.isphone){
					getApp().globalData.TTSSpeaker.stop();
					getApp().globalData.TTSSpeaker.speak('此服务项目为'+item.serviceItemName+'，已完成，'+this.currentTime+'前无需再进行服务登记提交。',1);
				}
			},
			// 页面上方区域显示老人信息：
			content(item){
			},
			// 老人日周期时间 GET /OldDayInterval/getByOldBaseId id
			getByOldBaseId() {
				let param = {}
				param.id = this.oldBaseId
				this.showrzTime = false
				this.$http('/care-service/OldDayInterval/getByOldBaseId', 'get', param).then(res => {
					if (res.data.code == 200) {
						this.showrzTime = true
						const jrTime = res.data.data
						// 判斷
						for(let i = 0 ;i<jrTime.length;i++){
							if(jrTime[i].isNow===true){
								this.rTime = i;
								console.log(i,'rTimerTimerTimerTimerTime')
							}
						}
						this.isHave = false
						if (jrTime.length > 0) {
							this.isHave =  true
						} else {
							this.isHave = false
						}
						this.jrTime = jrTime
						this.changeTime(this.rTime, 'rTime', this.jrTime[this.rTime])
					}
				});
			},
			// 顶部tab变色
			changcolor(index,item,voice) {
				if(voice!=undefined){
					if(this.$store.state.state&&this.$store.state.isphone){
						getApp().globalData.TTSSpeaker.stop();
						getApp().globalData.TTSSpeaker.speak(item,1);
					}	
				}
				 console.log(this.zTime,'zTimezTimezTime')
				this.tabindex = index;
				this.isButton = false;
				switch (index) {
					case 0:
						this.totalCheck(this.jsList);
						this.immediatePlan()
						break;
					case 1:
						this.totalCheck(this.jrList);
						this.getByOldBaseId()
						break;
					case 2:
						this.getCurWeekDay()
						this.totalCheck(this.bzList);
						// this.changeTime(0, 'zTime','周一')
						break;
					case 3:
						this.totalCheck(this.byList);
						this.getBzTime();
						break;
				}

			},
			// GET /immediatePlan/listAll
			// 获取老人的即时服务计划
			immediatePlan() {
				let param = {
					oldBaseId: this.oldBaseId
				}
				this.$http('/care-service/immediatePlan/listAll', 'get', param).then(res => {
					if (res.data.code == 200) {
						let arr = res.data.data;
						for (let item of arr) {
							item.checked = false
						}
						for (let item of arr) {
							item.serviceItemIcon = JSON.parse(item.serviceItemIcon)
						}
						this.isHave = false
						if (arr.length > 0) {
							this.isHave = true
						} else {
							this.isHave = false
						}
						this.jsList = arr
					}
				});
			},
			changeCheck(index,item) {
				if(this.$store.state.state&&this.$store.state.isphone){
					getApp().globalData.TTSSpeaker.stop();
					getApp().globalData.TTSSpeaker.speak(item.serviceItemName,1);
				}	
				this.jsList[index].checked = !this.jsList[index].checked;
				this.totalCheck(this.jsList);
			},
			// 改變tab
			changeTime(index, time, item,voice) {
				 console.log(item)
				switch (time) {
					case 'rTime':
						if (this.isHave) {
							this.currentTime = item.endTime
							let time = item.beginTime+'到'+item.endTime
							if(voice!=undefined){
								if(this.$store.state.state&&this.$store.state.isphone){
									getApp().globalData.TTSSpeaker.stop();
									getApp().globalData.TTSSpeaker.speak(time,1);
								}	
							}
							
							console.log(index,'this.rTimethis.rTimev')
							
							this.isButton = false;
							this.rTime = index;
							this.jrId = item.id
							// 老人的日计划  GET /oldDayPlan/listAll
							let param = {}
							param.oldBaseId = this.oldBaseId
							param.oldDayIntervalId = item.id
							this.$http('/care-service/oldDayPlan/listAll', 'get', param).then(res => {
								if (res.data.code == 200) {
									let jrList = res.data.data
									this.isTime = true
									if (jrList.length > 0) {
										this.isTime = true
									} else {
										this.isTime = false
									}
									this.jrList = jrList
									for (let item of this.jrList) {
										item.serviceItemIcon = JSON.parse(item.serviceItemIcon)
									}
								}
							});
						}
						break;
					case 'zTime':
						this.currentTime = item
						//默認第一周
						
						if(voice!=undefined){
							if(this.$store.state.state&&this.$store.state.isphone){
								getApp().globalData.TTSSpeaker.stop();
								getApp().globalData.TTSSpeaker.speak(item,1);
							}	
						}
						this.zTime = index;
						this.bztimeRange = item
						this.isButton = false;
						//老人周计划  oldBaseId  dayNum: Old Week Plan Controlle GET /oldWeekPlan/listAll
						let paramz = {}
						paramz.oldBaseId = this.oldBaseId
						paramz.dayNum = item
						this.$http('/care-service/oldWeekPlan/listAll', 'get', paramz).then(res => {
							if (res.data.code == 200) {
								let bzList = res.data.data
								this.isHave = false
								if (bzList.length > 0) {
									this.isHave = true
								} else {
									this.isHave = false
								}
								for (let item of bzList) {
									item.checked = false
									item.serviceItemIcon = JSON.parse(item.serviceItemIcon)
								}
								this.bzList = bzList
								
							}
						});
						break;
						//月
					case 'yTime':
					console.log(item,9999)
						this.currentTime  = item.day==undefined?item:item.day
						if(item.day!=undefined){
							if(this.$store.state.state&&this.$store.state.isphone){
								getApp().globalData.TTSSpeaker.stop();
								getApp().globalData.TTSSpeaker.speak(item.day,1);
							}	
						}
						this.yTime = index;
						this.bytimeRange = item
						this.isButton = false;
						// GET /oldMonthPlan/listAll  oldBaseId weekNum
						let yparam = {}
						yparam.oldBaseId = this.oldBaseId
						yparam.weekNum = item.weekNum==undefined?'第一周':item.weekNum;
						this.$http('/care-service/oldMonthPlan/listAll', 'get', yparam).then(res => {
							if (res.data.code == 200) {
								let byList = res.data.data
								this.isHave = false
								if (byList.length > 0) {
									this.isHave = true
								} else {
									this.isHave = false
								}
								for (let item of byList) {
									item.checked = false
									item.serviceItemIcon = JSON.parse(item.serviceItemIcon)
								}
								this.byList = byList
							}
						});
						break;
				}
			},
			changeTimeCheck(index,time,item) {
				switch (time) {
					case 'rTime': //日
						console.log(item)
						if(this.$store.state.state&&this.$store.state.isphone){
							getApp().globalData.TTSSpeaker.stop();
							getApp().globalData.TTSSpeaker.speak(item.serviceItemName,1)
						}	
						this.jrList[index].checked = !this.jrList[index].checked
						this.totalCheck(this.jrList);
						break;
					case 'zTime': //周
						if(this.$store.state.state&&this.$store.state.isphone){
							getApp().globalData.TTSSpeaker.stop();
							getApp().globalData.TTSSpeaker.speak(item.serviceItemName,1)
						}	
						this.bzList[index].checked = !this.bzList[index].checked
						this.totalCheck(this.bzList);
						break;
					case 'yTime': //月
						if(this.$store.state.state&&this.$store.state.isphone){
							getApp().globalData.TTSSpeaker.stop();
							getApp().globalData.TTSSpeaker.speak(item.serviceItemName,1)
						}	
						this.byList[index].checked = !this.byList[index].checked
						this.totalCheck(this.byList);
						break;
				}
			},
			totalCheck(list) {
				this.isButton = false
				const lists = list;
				for (let i = 0; i < lists.length; i++) {
					if (lists[i].checked) {
						this.isButton = true
					}
				}
			},
			//提交
			submit(index) {
				if(this.$store.state.state&&this.$store.state.isphone){
					getApp().globalData.TTSSpeaker.stop();
					getApp().globalData.TTSSpeaker.speak(`提交`,1);
				}	
				let items = JSON.stringify(this.item)
				switch (index) {
					case 0:
						uni.setStorageSync('tabindex',0)
						let data = this.jsList.filter(item => item.checked == true)
						uni.navigateTo({
							url: './card?item=' + items + '&data=' + JSON.stringify(data) + '&cycle=' + 0
						})
						break;
					case 1:
						uni.setStorageSync('tabindex',1)
						let data1 = this.jrList.filter(item => item.checked == true)
						uni.navigateTo({
							url: './card?item=' + items + '&data=' + JSON.stringify(data1) + '&cycle=' + 1 + '&timeRange=' + this.jrId
						})
						break;
					case 2:
						uni.setStorageSync('tabindex',2)
						let data2 = this.bzList.filter(item => item.checked == true)
						uni.navigateTo({
							url: './card?item=' + items + '&data=' + JSON.stringify(data2) + '&cycle=' + 2 + '&timeRange=' + this.bztimeRange
						})
						break;
					case 3:
						uni.setStorageSync('tabindex',3)
						let data3 = this.byList.filter(item => item.checked == true)
						uni.navigateTo({
							url: './card?item=' + items + '&data=' + JSON.stringify(data3) + '&cycle=' + 3 + '&timeRange=' + this.bytimeRange
						})
						break;
				}

			}
		}
	}
</script>
<style scoped lang="scss">
	.position-absoulte{
			position: absolute;
			top: -16rpx;
			right:-16rpx;
			font-size:24rpx;
			color: red;
			border:1rpx solid red;
			padding:6rpx;
			transform:rotate(30deg);
			border-radius:4rpx;
		}
		.position-content{
			height: 100%;
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 24rpx;
			border:none;
		}	
		
		
		// .positions-img{
		// 	width:30rpx;
		// 	height: 30rpx;
		// 	position: absolute;
		// 	right: 0;
		// 	top: 0;
		// }
		.cu-tag {
			height: 36rpx;
			margin: 0 15rpx;
		}
	
		page {
			// background-color:pink;
			width: 100vw;
			height: 100vh;
		}
	
		.det_top {
			padding: 20rpx;
			padding-right: 4rpx;
		}
	
		.padding {
			padding: 20rpx;
		}
		.position-center{
			text-align: center;
		}
		.position-diy{
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100%;
			height: 100%;
			font-size: 40rpx;
			overflow: hidden;
			border-radius: 24rpx;
		}
	
		.detail {
			display: flex;
			justify-content: space-between;
			align-items: center;
	
			.detail-right {
				flex: 1;
	
				.name {
					padding-left: 10rpx;
					color: #666;
					font-size: 32rpx;
					margin-bottom: 10rpx;
	
					.age {
						margin-left: 40rpx;
						font-size: 28rpx;
					}
				}
	
				.top {
					border-bottom: 1rpx solid #CCCCCC;
					padding-bottom: 6rpx;
				}
	
				.bot {
					display: flex;
					font-size: 30rpx;
					margin-top: 12rpx;
	
					.left {
						flex: 1;
					}
	
					.right {
						flex: 1;
					}
				}
			}
		}
	
		.detail-img {
			margin-right: 20rpx;
			height: 100rpx;
	
			image {
				height: 100rpx;
				width: 100rpx;
			}
		}
	
		.tab {
			display: flex;
			margin: 20rpx 0;
	
			.tab-item {
				flex: 1;
				text-align: center;
				font-size: 34rpx;
			}
	
			.text-rig {
				border-right: 1rpx solid #AAAAAA;
			}
		}
	
		.text-orange {
			font-weight: 700;
		}
	
		.block {
			display: flex;
			flex-wrap: wrap;
			justify-content: flex-start;
			align-content: center;
			background-color: #FFFFFF;
			padding-bottom:50rpx;
			.inner {
				margin: 30rpx 0;
				width: 250rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
	
				.inner-center {
					width: 60%;
					display: flex;
					flex-direction: column;
					justify-content: center;
					align-items: center;
	
				}
	
				.block-item {
					width: 160rpx;
					height: 160rpx;
					border-radius: 24rpx;
					border: 1rpx solid #CCCCCC;
					position: relative;
	
					image {
						position: absolute;
						left: 50%;
						top: 50%;
						transform: translate(-50%, -50%);
						width: 100rpx;
						height: 100rpx;
					}
				}
	
				.position {
					display: flex;
					justify-content: center;
					align-items: center;
					.position-inner {
						position: absolute;
						top: -8rpx;
						right: -8rpx;
					}
				}
			}
		}
	
		.submit {
			position: fixed;
			height: 13vh;
			bottom: 0rpx;
			left: 0;	
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100%;
			z-index: 9999;
			background-color: #FFFFFF;
			button {
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
				height: 90rpx;
				margin: 0 50rpx;
			}
		}
		.tplan {
			display: flex;
			.left {
				flex: 1;
	
				.inner {
					text-align: center;
					height: 70rpx;
					line-height: 70rpx;
				}
			}
	
			.right {
				flex: 2;
			}
		}
	
		.rTime {
			background-color: #FFFFFF;
		}
		.scroll_left{
			height: 59vh;
			background-color: #F1F1F1;
		}
		.scroll_right{
			height: 59vh;
			background-color: #FFFFFF;
			
		}
			
		.scroll_right_inner{
			display: flex;
			flex-wrap: wrap;
			align-items: center;
		}
</style>
